<?php

require 'lastfmapi/lastfmapi.php';

// GET SESSION
$token = "geotrack";
if ( !empty($_GET['token']) ) {
	$token = $_GET['token'];
}
$vars = array(
	'apiKey' => '5f6f9b4707f2915752b8f74ffeedb96d',
	'secret' => 'efdac34077fef10cd7312df21e58eb02',
	'token' => $token
);
$auth = new lastfmApiAuth('getsession', $vars);

// SET SESSION
$vars = array(
	'apiKey' => $auth->apiKey,
	'secret' => $auth->secret,
	'username' => $auth->username,
	'sessionKey' => $auth->sessionKey,
	'subscriber' => $auth->subscriber
);
$config = array(
	'enabled' => true,
	'path' => 'lastfmapi/',
	'cache_length' => 1800
);
$auth = new lastfmApiAuth('setsession', $vars);

?>